# -*- coding: utf-8 -*-
# File : service.py
# Author: taoyahui
# Date : 2021/4/20
from tasks.get_sys_env import *
from tasks.init_configure import *
from utils.common_util import *
from results import *


# deploy_admin接口的服务层信息
def deploy_admin_service(req_body):
    if has_keys(req_body, 'ip', 'username', 'password', 'port'):
        req_info_incomplete_result
    ip = req_body['ip']
    username = req_body['username']
    passwd = req_body['passwd']
    port = req_body['port']
    result = init_configure(ip, username, passwd, port)

    return result


# 获取本地配置信息
def get_local_sys():
    result = get_sys_env('10.16.81.153', 'root', '123456', 60122)
    return result
